fixed a bug in cull_to_size
Merge remote-tracking branch 'origin/master'