Bug fix: function call bug fix