Fixed wonky function call