Fix parameters and return types for some functions.