several fixes, better random options