fixed bug in the fiber allocation routine