Was calling a wrong function.