fix issue where model was not initializing at correct time