bug fixes for ALattice and new quantization tests