Various preprocessing fixes.