helper function fixes #103