fixed javascript close image issue