improve scene loading logic