fix expect behavior