Fixed some code both in engine and in tests regarding time usage for
matching in Issue #6