Fix bugs

Signed-off-by: pdrolourenco@gmail.com <mejaime@mejaime-PC.lan>