Fixed some bugs with firefox content scripts.