fix back functionality