more fixes for ubuntu #787