adding a guard for empty surfaces