Fix warnings and fatal parsing errors