fixing instability of CDI tests

Closes #764
yep, fixed here f3eadb63ab79f2975f5ed7f4e89c4c295a7a8c6e