Various fixes

Signed-off-by: naso