Fixes exceptions