Bug fix for handleFill