Quick fix for error handling