Fix undefined symbol errors

pyflakes finds these very easily