Fix inappropriate exception