Fix some exception cases