fixed issue with infinite loop due to improper check for done value.
fixed issue with infinite loop due to improper check for done value.

Also simplified a lil bit of the logic to not have an array or actions
to execute since we can only have one.

MiguelCastillo/coseq