correcting ifthenelse error
draining