fix a bug of lookuptables