addAfterGivenX() works properly