fix credentials bug