Fix behavior when set unproper resolution values