Fix rectangle hasPoint bug