fix crash old way