Added pop logic.