Fix parent/container bug and emit position