Closes #82. Test for #82 to follow
Tests for #82