Shouldn't this be global.nextMap?