Added avvailable capacity check