Fixed two "undefined variable" errors