Remove unnecessary calls to panic