use ref in default(). Closes #264