Yep, the code deleted in the above comment probably needs to move here.