Fixed comparison type mismatch and a faulty use of the dereference
operator.