Fix for case handling of #Q tag