Add return value to unpad_seq to allow abort on error