Fixed wrong enqueueing.

Fixes #505.