Fix some potentially dangerous things