Add test Calculate positions
Fix bug with internal items