fixed issues line capacity calculaiton