fixes to regi - STILL DOES NOT FUNCTION