fix whitespace issue in if block