Firefox bugfixes
Nick's fixes