Important documents management

maybe check if query.context is defined?