Fixing possible bugs on Exceptions