fixed the problem of epenses not nesting right