fixes for warnings and demo app