Fixed problems identified during tests