More elegant error handling
Typo fix
Minor fix