Fix undefined errors

Signed-off-by: Tim Smart <tim@fostle.com>