fixing various issues