Fixed a bug with Scale to 512×512, reported by @starrcourt.