Fixed cast issue with ARC