Fixed syntax problem with wrong function declaration