APT. 407: ending preview bug fix

ending preview bug fix