more error handling and fallbacks