fix string formatting bug
use type assertion to check recovered object