Fixed bugs with SOO and error results