replaced massert with status return #938