insertRec clean up fixed empty db bug