Process chunk from buffer in final step

In the final step any the buff will contain the last chunk. The final
step now ensures that the left over chunk is processed.