Fix undefined variable notice; fix parameter type

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