add compile flag
fix pts implementation