Should fix null reference exception