Big fix when there is variable length slots.
Big fix when there is variable length slots II.
Merge pull request #144 from tonyhuang/salting

Big fix when there is variable length slots.