Make :on-close take state in fun-mode.
Run draw function before update called for the first time in fun-mode.