Fixed a bug in percolation