json and variant bug fixes