Fix minor test bugs