fix some bugs with destroy/init logic, mobile view check