Added important improvements

It will improve work of module in newer iOS version and fixes some problems on current version.