Revert "Revert "FloodFill Bugfixes""

This reverts commit 22a632d63ac48e8d2cd72de053af1df5de046522.