fixed Safari and Firefox bugs