iOS 5 compatibility added