patch that cleans up notices as well