moved filling of map, trying to fix frame skip