Fix TypeError: Cannot read property 'results' of null (fix #22)