Added tests for issue #494