Some changes in order to accomodate issues around running HR under Apache.