fixed various issues