fix the if ... else condition in shorttermDreams class