bug fix for warnings