Added sql insert protection