move threadlocalremove to contorllerbase