fixed bug in xxp on right boundary