fixed some issues in tests