fixed assining bug