Restore variables, closes #450 and #449