fix for checking against grid