Fix exception on bad directive '@'

Without this fix the following exception was raised:
NoMethodError: undefined method `gsub' for nil:NilClass