fix NaNms bug when doing write operations with gle