solving crash problem