Fixes issues with type check.