Fixing the two bugs I introduced that findbugs discovered