Fix to update alloc count after successful alloc