Fixed bug in rc_id generation