optimalization fix