Thanks to @petems for providing this fix for some errors on 1.8.7 and 1.9.2 builds.