Very buggy implementation of filling in the path.