correcting row assignment error