check coords before updating