android memory and crash fixes