Fixed ios6 and added ipad support