Add check for define border