Fix scaling for cocoonjs