fixed protect_from_forgery bug