remove debug statements
minor bug fixes.