fixes #1196

Added missing fork for empty results sequence in foldTasks method, Tests.scala