Small fixes for ql backend