Let's define $\hat{q},\ \hat{p}$ the positon and momentum quantum operators, $\hat{a}$ the annihilation operator and $\hat{a}_1,\ \hat{a}_2$ with its real and imaginary part, such that $$ \hat{a} = \hat{a}_1 + j \hat{a}_2$$ with $$\hat{a}_1 = \sqrt{\frac{\omega}{2 \hbar}}\hat{q},\ \hat{a}_2 = \sqrt{\frac{1}{2 \hbar \omega}}\hat{p}$$ (for a reference, see Shapiro Lectures on Quantum Optical Communication, lect.4)
Define $|a_1 \rangle,\ |a_2\rangle,\ |q\rangle,\ |p\rangle$ the eigenket of the operator $\hat{a}_1,\ \hat{a}_2,\ \hat{q},\ \hat{p}$ respectively.
From the lecture, I know that $$ \langle a_2|a_1\rangle = \frac{1}{\sqrt{\pi}} e^{-2j a_1 a_2}$$ but I do not understand how to obtain $$ \langle p|q\rangle = \frac{1}{\sqrt{2\pi\hbar}} e^{-\frac{j}{\hbar}qp}$$
I thought that with a variable substitution would suffice, but substituting ${a}_1 = \sqrt{\frac{\omega}{2 \hbar}}{q},\ a_2 = \sqrt{\frac{1}{2 \hbar \omega}}{p}$, I obtain $$\frac{1}{\sqrt{\pi}} e^{-\frac{j}{\hbar}qp}$$ which does not have the correct factor $\frac{1}{\sqrt{2\pi\hbar}}$.
What am I missing?