fixed some loss accounting