fix #198, also whitespace fixes