Added some simple guards