Fix things

Compile & runtime errors.