fix for npe database