Fixed issue #29: Incorrect selection of methods under certain conditions.