Fixed some small bugs in the portaudio backend