Fixed a bug and added an Eq instance for Func