fixed CAS when result is null