fixing loading bugs