fixed two bugs related to mexinputs of matlab interface