Fixes for notebook mode