You can not claim
both treaty $5000 and std deduction in the same time if you file 1040 after sixth year and on.
Read pub 970 Special Restrictions b under article 20: if within the time limit, the student may claim tax treaty even if s(he) qualifies as "resident alien" for tax purposes but not applicable for permanent resident or immigrant status…standard deduction is lost if treaty is claimed as "resident alien".