Bugfix in function call