Fixed Javascript Bug