Fix of #SPC-598 and #SPC-600