fixed c bug