fix select timeout, add some macro fix git conflicts