fixing some minor bugs in quotes module

Commit messages explain the patches.