Fixed small bug in periodogram