fix scalexy, not always working properly