Undo function hotfix