Fixed issue with inverted intermediates.