fall back to reflection to keep compatibility with older versions