backporting a change by @batmoo to clean up warnings