fixed theme laod bugs and delete unused statements