fixing js a bit