Improve error handling for populate