changed order of before/after methods and fixed documentation typo