Fixed two silly bugs causing the models to be corrupted