fix warning for casting NSInteger