2014-05-31: fix two nullpoint exception