added serialization support, improved ie5+ fix