Fixed bugg with infinite loop when getModel from ModelHandler