Fixed an issue with wrong function call