fixed a bug in some unit tests (closes #1092)