Fixes deprecated warnings in IOS7