Added a few protections