Rub working
Some minor bug fixes