Replaced NULL to 0.