fix NpSQL bug