fix read and set fault on ubuntu