Added changes for compability with thunderbird