fixed boundary drawing issue