Fixed permission BOOT_COMPLETED, fixed possible NPE