Fix problem with toggle-project-explorer

The function didn't work correctly when PE hadn't been started