fixed possible NullPointerExceptions DBConnector