fixing bondary error