many fixes

Thanks Dylan :)