Cheap security fixes part 2

Cheap security fixes part 2