various smaller fixes