Fixed automatic type checking