clear variable cache in clearState() as suggested by tim. fix odd values for long...