Fixed using NULL instead of 0