Fixed the inccorect popping error