Show error message only if no document is displayed, fix the star/unstar bug