Removing leftover print lines