Catch exception to avoid crash