fix compile bugs in release version