Fixed a small bug in the security of the previous commit