improvements and bug fixes in sequence management