Fix some error shadowing issues