corrected overlapping tiles problem