Fixes error in models