added the scale factor to fix the vacant pixel problem