Added option to allow generation of empty session