update code style

update code style for security patch: change the indentation
 from tab to 4 blank
update test cases to make them pass