fixes #596 and adds a spike for #604