Fixed  a bug in fast table look-up