stability and performance fixes