fix a bug of wrong coordinate conversions