conditions are not appearing correctly in preview