Added iOS5 support