Fixed bug in fill tool