Correct some bugs. It now return correctly a result!