Autoclose of preview