fixed connection between before and after