afterDispatch was written incorrectly.