Updated js & set_userstate to remove some display bugs