variable [checkLocation] doesn't exist fix