Fixed probability check
Added grammar print