fixed error in charges controller