ported CSV testcases & fix from ottodev30 branch