Added tests for issue331