Created by: gabrielfedel
It was using an wrong variable, and because of this it was not working correctly.