Fixed return statements in grammar