Some bug fixes and usability improvements