Fixing IORef stuff.