build with NLS now, fixed few warnings in state.c