Add tests for #168 & #169