this should fix some errors when registering models