Fixed bug in kernighan move