fixed bug in merge rseq test
small code cleanup in merge rseq function