Some improvements and bug fixes
Some improvements and bug fixes