fixes exceptions