Some strange error with assignment