Avoid crash before training queue available.

Fixes #24