fixed puzzle bug