Fixed error in credential assignment