Fixed error in case if semicolon after class body, added test