bugfix to intermediate3