* fixes by Tansky
* fixes bugs