nil problem fixed