fixing several small issues