Amend commit daf0b7cdaf3d6d5ca7c4e3c82278cf1c91fccefe, regression tests fix