Fix exception classes

Signed-off-by: Guilhem Pujol <guilhem.pujol@gmail.com>