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