Fixed an NPE that showed up from the fix for BZ#1019013