Bug fixes
(cherry picked from commit 0692c2211dfcc92b3381544fc1f064185d9b4aeb)

Conflicts:
	.travis.yml
Tests
Bug fix
Merge pull request #1077 from sjinks/bag-crash

Bug fix