fixing crashed error