cleanup errors and warnings