fixed `after` method detection