fix flagreturn for map advance