Fixes nil model issues