dream now correctly handles null matricies