Several fixes

Hi,

Please commit these changes :)