Add safety measures to API