Fixed bug in periodefinder.