Fixed bugs and grammar