fixed bug in reading boundary