fixed bugs introduced by whitespace cleanup