Added some resolution handling