Add matte input support and a workaround for broken input size