bugfix with instance type checking for freeze