Fixed issue caclulating cost total