Made small changes to accomodate gjospin's Sfams_updaer