fix testing errors in crystal and wave_base