Bug fixes and features