moved handleOpenURL to head 1