fixed a bug which prevented the app from working in most browsers.