better handling of empty notebooks