Function was used before it was defined

Signed-off-by: Marc Delisle <marc@infomarc.info>