Fix initial device width

Thanks to http://stackoverflow.com/a/15549901/653152