fix an unexpected exception