fixing logic problem.

Signed-off-by: Nico Magni <nicomagni@wolox.com.ar>