Fixes potential crash after load segment