Run after hooks properly