boundaries bug fixes