fix automated test bugs