Fix bug after dismiss