Bug fixes

Signed-off-by: Adrian Espinosa <aespinosamoreno@gmail.com>