[FIX] Bugfixes on JavaScript widget