fix type checking.