errors and warnings cleanup