Inserting into correct row