Fix error with before/after script