fix #481 - query serialization with empty totals function name
fix #482 - use unique name instead of ordinal for measure mapping, fix default measure issue