fixing unterminated statements