typo
Better error handling