Fixed bugs and made loading faster