fix thunk updating in application thunks used by atomicModifyIORef