fixed some notice warnings