Fixed Javascript Problems