fixes small problems in js sript