resolve a bug in pad