fixed stack overflow bug in liquid tank (#187)