fixed cutting off on end