On my server stack size in cupboards is 2.0. When a player takes a stack of lowgrade fuel (1000) from his cupboard and moves it onto a miner's hat in the inventory, 500 fuel remains in the cupboard, 100 fuel goes into the hat, and 400 simply disappears into thin air.