Fix possible ValueError in !UltraSoftcore prepare