wqs fixed a few bugs