optimized version fix