introduces a little query to correct borders