Bug fixes and performance updates