fix for performance bug