Fixing up code for hard fork

Doesn't quite seem to work yet...