Fixed prompt-self-update function