Attempting to fix nullrefexecption crash