FIX: again bug in periodic_generator