fixed (possibly) truncate for GAE