fixing length discrepency issues