                 @fixRadial(params)
             before + prefix + @name + '(' + params.join(', ') + ')'
 
-      prefixedDecls.join ','
+      prefixedDecls.join(',')
 
   # Direction to replace
   directions:

    'bottom right': 'top left, bottom right'
    'bottom left':  'top right, bottom left'

  splitDecls: (decl) ->
    chunks = decl.split ','
    decls = []
    currentDecl = []
    for i in chunks
      # chunks starts with gradient declaration
      if @gradientStartRegexp.test i
        if currentDecl.length == 0
          # start new decl
          currentDecl.push i
        else
          # save current decl and start new one
          decls.push currentDecl.join ','
          currentDecl = [i]
      else
        currentDecl.push i

    # save last parsed decl
    decls.push currentDecl.join ','
    decls

  splitParams: (params) ->
    array = []
    param = ''

            'radial-gradient', 'repeating-radial-gradient']

  @regexps = { }
  @starts  = { }
  for i in @names
    @regexps[i] = new RegExp('(^|\\s|,)' + i + '\\((.+)\\)', 'gi')
    @starts[i]  = new RegExp('(^|\\s*)' + i, 'i')

  # Cache regexp to parse params
  constructor: (@name, @prefixes) ->
    @regexp      = Gradient.regexps[@name]
    @startRegexp = Gradient.starts[@name]

  # Change degrees for webkit prefix
  addPrefix: (prefix, string) ->
    string.replace @regexp, (all, before, args) =>
      prefixedDecls = []

      for decl in @splitDecls(all)
        prefixedDecls.push decl.replace @regexp, (all, before, args) =>
          params = @splitParams(args)
          params = @newDirection(params)
