Fix credentials bug