Fixing database sequences. Adding save register from endpoint