fixed function type errors