Fix some errors produced by temporary fixes