Fixing bugs to allow us to build with ARC