Error: expected string, instance method found