better handle scaling