fixed past cost queries and rename of active one