Stabilized code

Reverted some potential fixes that ended up not working