Added code to allow closing the Option