Tests and fix SEQWARE-1632, SEQWARE-1516