fixed backwards pop