Fixed downcasting issue in IdGenerator. Can assign properties of short, byte etc now...