Added database prefix to queries