Fix functions on models