       form.message.$error.reg_acct_required = true
 
     msgSize = Utils.byteLength JSON.stringify($scope.chatBid)
-    $scope.feeRequired = (pricing.price + (parseInt( msgSize / 400 ) + 1) * Info.PRECISION) / Info.PRECISION
+    $scope.feeRequired = getRequiredFee(msgSize + 10) # deail with marginal length problem
 
     if $scope.feeRequired > $scope.from.account.balance.amount / $scope.precision
       form.$setValidity "message", false

          keep_chat_down()
        , 300

  checkMessageFee = (message) ->
    msgSize = Utils.byteLength JSON.stringify(message.message)
    feeRequired = (pricing.price + (parseInt( msgSize / 400 ) + 1) * Info.PRECISION) / Info.PRECISION
    return message.amount.amount / Info.PRECISION >= feeRequired

  $scope.setForm = (frm) -> form = frm


    $scope.doSend()

  if !$scope.symbol and Info.symbol == ''
    Info.refresh_info().then ->
      $scope.symbol = Info.symbol
