very ugly fix - all because of node stack overflow problem