Make key and ids dependencies of flushQueue
Merge pull request #2 from keradgames/bugfix/make_key_and_ids_dependencies

Safely checks