- fixed a bug with an invalid exception