fixing that javascript sometimes is not loaded