Adding tests for #604