Fix a few problems introduced in previous commit

TBR @devoncarew