Fixing null reference.