1. fix bug in sd