fix before after bug