fixed check and redo credentials bug.