Function call bugfix