Support storage v5 and write
Fixed int to string comparison