script.js:bugfix:two close calls from tap and move