Swap map and input bug