fixed various exceptions