Removing extended rectangle