boundary box bug fixed