re-fixed the nil problem