fix EXC_BAD_ACCESS issue