Bug fix

Fixed issue with Arrays and Collections (wrong arguments being passed to
the addPromises function)