fix some compilation bugs in header, add some notes