fixed minor issue with invalid statements not triggering an error message