Avoid NPE when tx did not read before writing