Fixed memory access problems
Fixed memory access problems

cherryc/dynet,Peilun-Li/dynet,mitchellstern/dynet,Peilun-Li/dynet,Abasyoni/dynet,Abasyoni/dynet,kamigaito/cnn,cherryc/dynet,Abasyoni/dynet,Peilun-Li/dynet,mitchellstern/dynet,cherryc/dynet,kamigaito/cnn