Fix 'no implicit conversion of Symbol into Integer' error