Solves the issues for shortcuts not working for all documents

This solves the issue #52