fixed swipe close script error