Fixing #8 also fixes #13. Adding an extra test for #13