Bug fix (JS)(again)