fixed border calcultion issue