Fixed a bug with methods.