Re-add old fixes that I accidentally removed