Fix model handler bug