fixing open drawer bug in script.js