correction for negative coordinate