status result value fixed and allocate function improvement