fix bugs with assets loading