refixed performance-bug