Fixed the issues with boundary

Fixed the issues with boundary