Added some extra safety