fixed graphyicDx/Dy calculation