Applied some changes made in iRODS 4.x