Fix Q import issue on Travis