Add license header and fix startActivity() crash