fixed error when loading