frontend js fixes