fixed test bugs