small fix for optimize performance