Added an on-close inline option