fixed bug with before/after field