CONTRIB-4773 fixed various errors from Tim Lock