Fixed problem with ds_pop, that introduced bugs.