fixed bug if no boundary set