fix error introduced when fixing warning -Wunused-function