Fix an unknown method bug

The bug was revealed in Firefox. Chrome did not complain though.