Improved ASSIGN_DIM and ASSIGN_OBJ