Fixed bugs and reset defaults