fixed device scaling, and some other misc stuff