Fixed the insertion of data