Fixed import with no records - fixes #279 and fixes #282