Crash Fix and improvements