Bug fixes in various features