Preview still buggy, this is the first attempt at fixing