hide some warnings when not in debug mode; helps in #811