a fix to type checking