Fix for EXC_BAD_ACCESS