[BUGFIX] When creating a new Document Type ES crashed

Upon creating a new document type the target workspace is not yet set
causing the flushQueus method to fail.
Merge pull request #25 from SimplyAdmire/master

[BUGFIX] When creating a new Document Type ES crashed