fixed allocation error