Improved Error handling for first data