Fixed bug when searching for level by name

Prior code was attempting to find a property on the $level string instead of the $level_obj object.