Fix canFill/canDrain in tanks

Close #1832