Fix the method should be optional. Thanks @stof