Added workaround for Chrome: Uncaught TypeError