Made some corrections on flood fill and pencil tool

This caused overlapping tiles to display incorrect behaviour