fixed bugs

fixed to bug in conect to DB