Fixed some inconsistencies in exception handling