Fix error generating map preview