Fixes for the toplevel interactive code