Fix bags with some tests. Work with environment