Fixes dead code; Removes unnecessary assignment

1. Fixes dead code
2. Removes unnecessary assignment