NULL propagation bug fix