Minor fixes, a typo and some exceptions