fixed missing definition of availableForWrite