Re-added code for afterActions