8 puzzle bug fix