fix(tests): fixed several test bugs