Vários fixes.

Signed-off-by: Cristiano Fernandes <cristiano@azapp.net>