Fixes for quantum template