Fixed bug in Hamming window generation