Fixed some bugs, fixed some settings not setting in setup function