fixes and performance enhance