Periodic output now works properly.