Fixed nil problem.