Fix the bug of changeX method.