fix cost bugs