fixes based on exceptions