Updated to compile with iOS6