reorder the init to fix crash on 2.3 devices