First fixes before implementing sorting