coa: minor fix
diff --git a/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.py
index 333f5c3..16c6acf 100644
--- a/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.py
+++ b/erpnext/accounts/doctype/chart_of_accounts/chart_of_accounts.py
@@ -23,6 +23,7 @@
 			
 		if chart:
 			accounts = []
+						
 			def _import_accounts(children, parent):
 				for child in children:
 					account_name = child.get("name")
@@ -31,8 +32,9 @@
 					if account_name_in_db in accounts:
 						count = accounts.count(account_name_in_db)
 						account_name = account_name + " " + cstr(count)
-					
-					child.update(account_properties.get(chart.get("name"), {}).get(account_name))
+
+					child.update(account_properties.get(chart.get("name"), {})\
+						.get(account_name, {}))
 					
 					account = frappe.bean({
 						"doctype": "Account",
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index cc3253f..3d62b2d 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -119,9 +119,9 @@
 			"freeze_account": "No",
 			"master_type": "",
 		})
+		
 		for d in self.fld_dict.keys():
 			account.doc.fields[d] = (d == 'parent_account' and lst[self.fld_dict[d]]) and lst[self.fld_dict[d]] +' - '+ self.doc.abbr or lst[self.fld_dict[d]]
-		
 		account.insert()
 
 	def set_default_accounts(self):
@@ -273,7 +273,7 @@
 				['Direct Income','Income','Group','Income Account','Profit and Loss',self.doc.name,''],
 					['Sales','Direct Income','Ledger','Income Account','Profit and Loss',self.doc.name,''],
 					['Service','Direct Income','Ledger','Income Account','Profit and Loss',self.doc.name,''],
-				['Indirect Income','Profit and Loss','Group','Income Account','Profit and Loss',self.doc.name,''],
+				['Indirect Income','Income','Group','Income Account','Profit and Loss',self.doc.name,''],
 			['Source of Funds (Liabilities)','','Group','','Balance Sheet',self.doc.name,''],
 				['Capital Account','Source of Funds (Liabilities)','Group','','Balance Sheet',self.doc.name,''],
 					['Reserves and Surplus','Capital Account','Ledger','','Balance Sheet',self.doc.name,''],
diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py
index 8c12fc7..9d5756a 100644
--- a/erpnext/setup/doctype/company/test_company.py
+++ b/erpnext/setup/doctype/company/test_company.py
@@ -9,7 +9,7 @@
 class TestCompany(unittest.TestCase):
 	def test_coa(self):
 		for country, chart_name in frappe.db.sql("""select country, chart_name 
-			from `tabChart of Accounts` where country="India" order by country""", as_list=1):
+			from `tabChart of Accounts` where name = 'Deutscher Kontenplan SKR03'""", as_list=1):
 				print "Country: ", country
 				print "Chart Name: ", chart_name