Fix offset optimizing issue introduced by padding char (#398).

Fix #398