More robust map building