Fixing some compilation and running issues

Signed-off-by: Israel Cepeda <israel4c@gmail.com>