bug fixes to helper