inl.cpp fixed to copy correct data and insert it to result relation