Fixed errors in f logic.
Added test vector for first block.