fix problem with prototype mismatches