Fixed single entity return bug for pagination and wrote appropriate test
Merge branch 'DS-1203'