improvements imported from 1-0-stable
fixes issue revealed by Travis
fixes issue revealed by tests
shrinks test data file