Made cancel button work.