remove redundant  code in expect headers