Bug fix: elem not wrapped in jQuery object