Try to fix some javascript troubles