Minor refactoring that somehow wasn't included last time