performance and stability fix