Fixed some busgs...

and added try to stop crash