New test and fixes