another fix for the rect around coordinate func