Fixed assignment bug