performance fix for last commit