Fixed addRecord method

Changed the order of operations inside the method so that the copied
object is stored in the table with the meta data, leaving the original
object intact.