Added preparation for scaling for overlay context too