Fix error in addMethods

arguments needs to be turned into a real array in order to be for-in'd.