fixed saveId() directory bug; small changes