Fix xy reversal bug in localization selection. Thanks to Oskar Laitenberger for reporting this bug.