Some Javascript backend fixes