fixed allocate on select