Fix Javascript Bug