Fixed bugs
added comment