I am not sure, I used the same method that was used in the torch library, I modified code inside the library.
I resolved the problem in the end, it was a compilation problem, cleaning the project resolved it.