fixed bug with auto-assigning