fixed error when loading modules