Fix some bugs handling input that is not aligned at 16 bytes or has