fixed ths crashing issue