Fixed bugs