Fix single module incorrect calculation (i39)
fix single module problem and horizontal resizing