Fixing a ruby error