Fixing ssome exceptions.