Fix map context switching