catch exception to avoid crash