Fix "max-1" and town distance