Fixed restore and moved public to var