fix compiler warning by using correct type