Reverted previous commits, since it seems untested (does not work)