Fix prompt(when modified), cleanup function pointer with type for clarity.