several fixes (no, i dont want to explain :P)
Merge pull request #1628 from diegosarmentero/master

several fixes (no, i dont want to explain :P)