Merge branch '1.0' into 1.2
Backport fix incorrect behavior with priorities

See #24
Merge branch '1.2'