fix last problem about factor when changing resolution