Results were returned in wrong format when empty.  Now fixed

Have also added a test for this