Fixed the null ref exceptions...