fix for coordinates not correct calculated