Fix unit test crash rom Pull 840

Got lucky on OSX with memory boundary. Only crash on Windows/Linux.