Fixed a bug where an incorrect method was being called.