Little fix for better error handling