Severa minor fixes (see commits)