Fixed app crash errors