Fixed a bug in padding, and also made it more constant time