Reversion magic

Since I am unable to test this after some thinking, temporary reversion.