Fixes type checking