Fix popping order