Fixes issue with negative coordinates