Fixed a bug in assigning inputs

Input image area scaling lead to a bug. Now it's fixed.