fixed firefox loading error, added caching