fixed bug in test context