making the jdbc export more useful as well as fixing a bug