bug fixes and minor demo improvements