Fix #1688
Test case for #1688