fixing more possible crash points