Turn if conditional into else if for history_list deferred push