Reverted previous commit and re-applied it the way cim intended it to be.