run after_return functions