fixed iteration problem with hidden units