several signature and data type fixes