Fix bugs

Signed-off-by: PedroLourenco <pdrolourenco@gmail.com>