Fixed incompatible type errors.