minor bugfix in function helper