FIXED window.cookies fails with error [Closes #610]