Bug fix and whitespace fix