Fix NPEs in blocking code