Fixed error when returning workflow