fix a bug

now it can solve the problem correctly