Fix bug regarding ID generation
Fix bug regarding ID genearation