fix compiler warnings reported by kurt hornik