Fix ref.once() functionality