fixed issue if size=NULL