refactored change key generation
fixed wrong id being used for generating new changelog ID's