tried to match firefox behavior with chrome