fixing two issues Max found

--HG--
extra : source : 22fefaa0a475a099671335825e22c3464f5d9147