Corrected unused js code