Fix the build + 2 minor fixes

Why'd you move this code?