Fix for preventing an error occurred in Safari.