More fixes for the new environment