Don't assume numbers coming back from javascript are double, cast to Number.