unregister on destroy and forgot to commit