Added a check for coordinates (if == 0)