fixed primary key not updating, fixed rec makedir