fix plan so that scan ranges properly marshal to JSON