Function prototype was wrong