fix gen-modal