fix before and after