Fixed a bunch of bugs in the pyside backend