latest fixes

Signed-off-by: joao tiago viegas <jtamviegas@yahoo.co.uk>